package com.y.architecture.base_tab;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.view.ViewPager;

import com.y.architecture.base.IBaseContact;

import java.util.List;

/**
 * Created by youjingjing on 2017/11/29.
 */

public class IBaseTabPageContact {
    public interface IBaseTabPageView<T> extends IBaseContact.IBase, IPageContent, TabLayout.OnTabSelectedListener {
        void initTabPager(Bundle saveInstanceStatus);

        FragmentManager getAFFragmentManager();

        int getPagerId();

        int getTabId();

        List<T> getItems();

        void createPager();

//        void setTabSpaceEqual();

        void getData();
    }

    public interface IBaseTabPagerPresenter extends IBaseContact.IPresenter {
        TabLayout setTabLayout();

        ViewPager setPager();

        int getDefaultTabId();

        int getDefaultPageId();

        void createPager();

//        void setDefaultTabSpaceEqual();
    }

    public interface IPageTitle {
        String getTitle();
    }

    public interface IPageContent {
        Fragment getContent(int position);
    }
}
